<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>src.processing.indiutils.Indiutils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="src-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >ttrq4fleet - Petrina Papazek</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="src-module.html">Package&nbsp;src</a> ::
        <a href="src.processing-module.html">Package&nbsp;processing</a> ::
        <a href="src.processing.indiutils-module.html">Module&nbsp;indiutils</a> ::
        Class&nbsp;Indiutils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="src.processing.indiutils.Indiutils-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Indiutils</h1><p class="nomargin-top"><span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_src_proc_8" name="uml_class_diagram_for_src_proc_8">
<area shape="rect" href="src.processing.indiutils.Indiutils-class.html#p5_speed" title="calculates the 5th percentile of speeds using the standard deviation from the timeseries for every time interval." alt="" coords="17,36,249,55"/>
<area shape="rect" href="src.processing.indiutils.Indiutils-class.html#p95_tt" title="calculates the 95th percentile of travel times using the standard deviation from the timeseries for every time interval." alt="" coords="17,55,249,73"/>
<area shape="rect" href="src.processing.indiutils.Indiutils-class.html#stddev_speed" title="returns the standard deviation of speeds using the standard deviation from &#160;the timeseries for every time interval." alt="" coords="17,73,249,92"/>
<area shape="rect" href="src.processing.indiutils.Indiutils-class.html#calc_average_of" title="calculates the average for a given attribute for all intervals as list" alt="" coords="17,92,249,111"/>
<area shape="rect" href="src.processing.indiutils.Indiutils-class.html" title="Calculation tools for the indicator calculation" alt="" coords="16,11,251,112"/>
</map>
  <img src="uml_class_diagram_for_src_proc_8.gif" alt='' usemap="#uml_class_diagram_for_src_proc_8" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Calculation tools for the indicator calculation</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.processing.indiutils.Indiutils-class.html#p5_speed" class="summary-sig-name">p5_speed</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">timeseries</span>)</span><br />
      calculates the 5th percentile of speeds using the standard deviation from the timeseries for every time interval.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.p5_speed">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.processing.indiutils.Indiutils-class.html#p95_tt" class="summary-sig-name">p95_tt</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">timeseries</span>,
        <span class="summary-sig-arg">length</span>)</span><br />
      calculates the 95th percentile of travel times using the standard deviation from the timeseries for every time interval.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.p95_tt">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.processing.indiutils.Indiutils-class.html#stddev_speed" class="summary-sig-name">stddev_speed</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">timeseries</span>)</span><br />
      returns the standard deviation of speeds using the standard deviation
      from the timeseries for every time interval.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.stddev_speed">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="src.processing.indiutils.Indiutils-class.html#calc_average_of" class="summary-sig-name">calc_average_of</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">records</span>,
        <span class="summary-sig-arg">attribute</span>)</span><br />
      calculates the average for a given attribute for all intervals as 
      list</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.calc_average_of">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="p5_speed"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">p5_speed</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">timeseries</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.p5_speed">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

calculates the 5th percentile of speeds using the standard deviation from the timeseries for every time interval.

If there is no data on a specific time interval the value is set to None.
Following formula is applied to calculate the P:
    P05_v_i = v_avg_i - 1.96 * std_i
        - p05_v_i ... 5th percentile of speeds for the time interval i
        - v_avg ... harmonic speed provided by the Agg_record-object
        - std_i ... standard deviation at the time interval i
        
@return: values (numeric value of the percentile or None) in a list for every interval

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="p95_tt"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">p95_tt</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">timeseries</span>,
        <span class="sig-arg">length</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.p95_tt">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

calculates the 95th percentile of travel times using the standard deviation from the timeseries for every time interval.

If there is no data on a specific time interval the value is set to None.
If ther are no timeseries the method will raise an error. 
Following formula is applied to calculate the P:
    P95_tt_i = l/P05_v_i
    P05_v_i = v_avg_i - 1.96 * std_i
    
        - P95_tt_i ... 95th percentile travel time for the time interval i
        - p05_v_i ... 5th percentile of speeds for the time interval i
        - l ... link-length
        - v_avg ... harmonic speed provided by the Agg_record-object
        - std_i ... standard deviation at the time interval i

@return: values (numeric value of the percentile or None) in a list for every interval

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="stddev_speed"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">stddev_speed</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">timeseries</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.stddev_speed">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>returns the standard deviation of speeds using the standard deviation 
  from the timeseries for every time interval.</p>
  <p>If the timeseries-object is None an error will be raised. If there is 
  no data on a specific time interval, the value on this interval is 
  None.</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>values (numeric value of the standard deviation or None) in a 
          list for every interval</dd>
  </dl>
</td></tr></table>
</div>
<a name="calc_average_of"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">calc_average_of</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">records</span>,
        <span class="sig-arg">attribute</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="src.processing.indiutils-pysrc.html#Indiutils.calc_average_of">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>calculates the average for a given attribute for all intervals as 
  list</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>attribute</code></strong> - attribute of agg_record (e.g. speed, traveltime) as string</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="src-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >ttrq4fleet - Petrina Papazek</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Oct 25 19:15:42 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
